package chances.epg.ui.taglib.model;

public enum DirectionEnum {

	LEFT("left"), RIGHT("right"), UP("up"), DOWN("down"), UNKNOW("unkown");

	private String name;

	public String getName() {
		return this.name;
	}

	private DirectionEnum(String name) {
		this.name = name;
	}

	public static DirectionEnum findDirection(String name) {
		if (LEFT.name.equals(name)) {
			return LEFT;
		} else if (RIGHT.name.equals(name)) {
			return RIGHT;
		} else if (UP.name.equals(name)) {
			return UP;
		} else if (DOWN.name.equals(name)) {
			return DOWN;
		} else {
			return UNKNOW;
		}
	}

}
